<template>
  <el-card shadow="never">
    <div slot="header" class="card-header">
      <span>审计专题风险信息浏览</span>
      <el-button type="primary">点击查看更多审计专题风险</el-button>
    </div>
    <el-table :data="tableData" border style="width: 100%">
      <el-table-column prop="columnA" label="审计专题"> </el-table-column>
      <el-table-column prop="columnB" label="归属专题">
        <template slot-scope="scope">
          <router-link
            v-if="scope.row.columnB === '有价卡违规'"
            to="/yjk/fxtb"
            style="textDecoration:none;"
          >
            <el-link @click="handleClick(1)">
              {{ scope.row.columnB }}
            </el-link>
          </router-link>
          <router-link
            v-if="scope.row.columnB === '宽带业务管理违规'"
            to="/kdyw/fxtb"
            style="textDecoration:none;"
          >
            <el-link @click="handleClick(1)">
              {{ scope.row.columnB }}
            </el-link>
          </router-link>
          <router-link
            v-if="scope.row.columnB === '流量管理违规'"
            to="/llgl/fxtb"
            style="textDecoration:none;"
          >
            <el-link @click="handleClick(1)">
              {{ scope.row.columnB }}
            </el-link>
          </router-link>
          <router-link
            v-if="scope.row.columnB === '电子券管理违规'"
            to="/dzq/fxtb"
            style="textDecoration:none;"
          >
            <el-link @click="handleClick(1)">
              {{ scope.row.columnB }}
            </el-link>
          </router-link>
        </template>
      </el-table-column>
      <el-table-column prop="columnC" label="风险级别"> </el-table-column>
      <el-table-column prop="columnD" label="审计类型"> </el-table-column>
      <el-table-column prop="columnE" label="专题通过时间"> </el-table-column>
    </el-table>
    <div class="pagination">
      <Pagination />
    </div>
  </el-card>
</template>

<script>
import Pagination from './Pagination'
export default {
  components: {
    Pagination
  },

  data() {
    return {
      tableData: [
        {
          columnA: '2020北京用户违规处理',
          columnB: '有价卡违规',
          columnC: '普通',
          columnD: '审计处理',
          columnE: '2020.1'
        },
        {
          columnA: '2020北京宽带违规处理',
          columnB: '宽带业务管理违规',
          columnC: '普通',
          columnD: '审计处理',
          columnE: '2020.1'
        },
        {
          columnA: '2020北京流量违规处理',
          columnB: '流量管理违规',
          columnC: '普通',
          columnD: '审计处理',
          columnE: '2020.1'
        },
        {
          columnA: '2020河北电子券管理违规',
          columnB: '电子券管理违规',
          columnC: '低',
          columnD: '审计发现',
          columnE: '2020.1'
        }
      ]
    }
  },

  methods: {
    handleClick(val) {
      this.$bus.$emit('tabchange', val)
    }
  }
}
</script>

<style lang="scss" scoped>
.pagination {
  float: right;
  margin: 10px;
}
</style>
